home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / source.exe / POSIX / SH / STD / STDC / STRERROR.C < prev    next >
C/C++ Source or Header  |  1992-07-13  |  326b  |  20 lines

  1. #include <string.h>
  2.  
  3. /*
  4.  * strerror - map error number to descriptive string
  5.  *
  6.  * This version is obviously somewhat Unix-specific.
  7.  */
  8. char *
  9. strerror(errno)
  10. int errno;
  11. {
  12.     extern int sys_nerr;
  13.     extern char *sys_errlist[];
  14.  
  15.     if (errno > 0 && errno < sys_nerr)
  16.         return(sys_errlist[errno]);
  17.     else
  18.         return("unknown error");
  19. }
  20.